package com.stock.stockana.constants;

/**
 * ---------------------------------------------------
 * Description:
 * Author: ljgsonx
 * Belong to: com.wds.stock.stockana.requests
 * Time: 2016/1/15 17:52
 * ---------------------------------------------------
 */
public class NetWorkConstants {

    private final static String REMOTE_HOST = "http://45.78.35.217:8080/stockana";
    private final static String LOCAL_HOST1 = "http://192.168.6.202:8080/stockana";
    private final static String LOCAL_HOST2 = "http://192.168.0.108:8080/stockana";
    private final static String HOST_URL = REMOTE_HOST;

    //public final static String GET_ALLINVOICES_URL = HOST_URL+ "/show/getUserCollection";
    public final static String GET_ALLINVOICES_URL = HOST_URL+ "/show/getCollectionRealtime";
    public final static String GET_RECOMINVOICES_URL = HOST_URL + "/show/getRecStocks";
    public final static String GET_ONESTOCK_URL = HOST_URL + "/show/getDetail";
    public final static String GET_STOCKNEWS_URL = HOST_URL + "/show/getListNews";
    public final static String GET_PUSHRECORD_URL = HOST_URL + "/show/getPushRecords";
    public final static String GET_VERSIONCODE_URL = HOST_URL + "/getVersionCode";
    public final static String GET_USERINFO_URL = HOST_URL + "/user/getUser";
    public final static String ADD_STOCK_URL = HOST_URL + "/show/addCollection";
    public final static String DELETE_STOCK_URL = HOST_URL + "/show/deleteCollection";
    public final static String SETNOTIFI_URL = HOST_URL + "/show/updateSetting";
    public final static String DELETE_PUSHRECORD_URL = HOST_URL + "/show/deletePushRecords";
    public final static String LOGIN_URL = HOST_URL + "/user/login";
    public final static String SIGNUP_URL = HOST_URL + "/user/register";
    public final static String UPDATEUSER_URL = HOST_URL + "/user/updateUser";
    public final static String EASY_LOGIN_URL = HOST_URL + "/user/tempUserLogin";
    public final static String NOTICE_URL = HOST_URL + "/advertise.html";

    public final static String DOWNLOAD_APP = HOST_URL + "/download";

    //网络响应码
    public final static int RESPONSE_CODE_OK = 0;
    public final static int RESPONSE_CODE_ERROR = 1;
    public final static int RESPONSE_CODE_SERVER_ERROR = 2;
    public final static int RESPONSE_CODE_NETWORK_ERROR = 3;

    public final static int RESPONSE_ERROR_PHONEOREMAIL_HASUSED = 103;
    public final static int RESPONSE_ERROR_EMAIL_INVALID = 104;

    //网络响应说明
    public final static String RESPONSE_ERROR1 = "请求成功,但服务器响应信息不匹配:";
    public final static String RESPONSE_ERROR2 = "请求成功,但服务器给出错误信息:";
    public final static String RESPONSE_ERROR3 = "请求错误,发生未知错误:";
    public final static String RESPONSE_COMMON_MESSAGE = "获取股票信息失败,请重试!";

    //网络请求相关
    public final static String HEADER_AUTHORIZATION = "Authorization";

    public final static int TIMEOUT = 20000;

}
